package cn.ainit.yz.printexplain;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Service;

import cn.ainit.yz.execut.entity.Execut;
import cn.ainit.yz.execut.entity.ExecutFM;
import cn.ainit.yz.execut.entity.ExecutZD;
import cn.ainit.yz.execut.entity.ExecutZW;
import cn.ainit.yz.printexplain.entity.PrintExplainFM;
import cn.ainit.yz.printexplain.entity.PrintExplainZD;
import cn.ainit.yz.printexplain.entity.PrintExplainZW;

import cn.ainit.butn.proceduce.ButScripParams;
import cn.ainit.common.ReturnObject;
import cn.ainit.sys.framework.entity.SysButtons;
import cn.ainit.sys.framework.entity.SysColumns;
import cn.ainit.sys.pages.config.entity.ConfigFunctions;
import cn.ainit.sys.pages.config.entity.ConfigObject;
import cn.ainit.sys.query.datastore.DataStore;
import cn.ainit.sys.query.entity.QueryButton;
import cn.ainit.sys.query.entity.QueryColumn;
import cn.ainit.sys.ui.buttons.FormButtons;
import cn.ainit.sys.ui.entity.UIObject;
import cn.ainit.sys.ui.forms.Columns;
import cn.ainit.yz.printexplain.entity.PrintExplain;
import cn.ainit.yz.printexplain.entity.PrintExplainFM;

@Service
public class PrintExplainServiceImpl implements PrintExplainService{

	PrintExplainDao printExplainDao;
	
	@Resource
	public void setPrintExplainDao(PrintExplainDao printExplainDao) {
		this.printExplainDao = printExplainDao;
	}

	@Override
	public List<PrintExplainFM> findFMList(String ysId) throws Exception {
		return this.printExplainDao.findFMList(ysId);
	}

	@Override
	public List<PrintExplainZD> findZDList(String ysId) throws Exception {
		return this.printExplainDao.findZDList(ysId);
	}

	@Override
	public List<PrintExplainZW> findZWList(String ysId) throws Exception {
		return this.printExplainDao.findZWList(ysId);
	}
	
	@Override
	public boolean saveBase(PrintExplain printExplain) throws Exception {
		return printExplainDao.saveBase(printExplain);
	}
	
	@Override
	public boolean updateBase(PrintExplain printExplain) throws Exception {
		return printExplainDao.updateBase(printExplain);
	}
	
	@Override
	public List saveFM(List<PrintExplainFM> printExplainFMs,String peId)
			throws Exception {
		return printExplainDao.saveFM(printExplainFMs,peId);
	}
	
	@Override
	public List<String> saveZW(List<PrintExplainZW> printExplainZWs, String peId)
			throws Exception {
		return printExplainDao.saveZW(printExplainZWs,peId);
	}
	
	@Override
	public List<String> saveZD(List<PrintExplainZD> printExplainZDs, String peId)
			throws Exception {
		return printExplainDao.saveZD(printExplainZDs, peId);
	}
	@Override
	public String printToexec(String peId) throws Exception {
		return this.printExplainDao.printToexec(peId);
	}
	@Override
	public Execut getOneExecut(String exId) throws Exception {
		return this.printExplainDao.getOneExecut(exId);
	}

	@Override
	public List<ExecutFM> findExFMList(String ysId) throws Exception {
		return this.printExplainDao.findExFMList(ysId);
	}

	@Override
	public List<ExecutZD> findExZDList(String ysId) throws Exception {
		return this.printExplainDao.findExZDList(ysId);
	}

	@Override
	public List<ExecutZW> findExZWList(String ysId) throws Exception {
		return this.printExplainDao.findExZWList(ysId);
	}
	@Override
	public String caiLiaoChuku(String peId) throws Exception {
		return this.printExplainDao.caiLiaoChuku(peId);
	}
	
	@Override
	public String returnNewBath(String xtId, String byc, String config){
		String data=null;
		try {
			data=printExplainDao.returnNewBath(xtId, byc, config);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return data;
	}
	@Override
	public String keepModifyPrems(String dsId,String djId,HttpSession session)
			throws Exception {
		return printExplainDao.keepModifyPrems(dsId, djId, session);
	}
}
